<ui:composition template="/dynamic/layout/layout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="content">
		<div id="welcome">
			<p style="clear: both" />
		</div>

		<h:form id="formUsers">
			<p:dataGrid var="user" value="#{userMBean.users}" columns="3"
				rows="12" paginator="true"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="9,12,15">
				<p:column>
					<p:panel header="#{user.username}" style="text-align:center">
						<h:panelGrid columns="2" style="width:100%">

							<span><b>Login:</b></span>
							<h:outputText value="#{user.username}" />
							<span><b>Imie:</b></span>
							<h:outputText value="#{user.name}" />
							<span><b>Nazwisko:</b></span>
							<h:outputText value="#{user.secondName}" />
							<p:commandLink title="Edytuj" action="#{userMBean.editUser}">
								<h:outputText styleClass="ui-icon ui-icon-search"
									style="margin:0 auto;" />
								<f:param value="#{user.username}" name="userId" />
							</p:commandLink>
						</h:panelGrid>
					</p:panel>
				</p:column>
			</p:dataGrid>
		</h:form>
		<div id="main_content"></div>

	</ui:define>
</ui:composition>